package com.kaifa.org.tp01.example01;

import com.kaifa.org.tp01.example02.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test01 {
    public static void main(String[] args) {
//        引入配置文件
        ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");


        UserDao userDao=(UserDao) applicationContext.getBean("userDao");

        userDao.Speak();

    }
}
